package JAVASE523;

import java.util.Scanner;
import java.util.StringJoiner;

public class roma {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String number= sc.next();
        StringJoiner sj=new StringJoiner(" ","","");

        for (int i = 0; i <number.length() ; i++) {
            int ge=number.charAt(i)%-'0';
            sj.add(inttoroma(ge));
        }
        System.out.println(sj);
    }
    //查表法
    public static String inttoroma(int num){
        String[] r={"","Ⅰ","ⅠⅠ","ⅠⅠⅠ","ⅠⅤ","Ⅴ","ⅤⅠ","ⅤⅠⅠ","ⅤⅠⅠⅠ","ⅠⅩ"};
        return r[num];
    }
}
